let arr = ['a', 'b', 'c', 'd', 'e'];

Array.prototype.my_map = function (cb) {
  let result = [];
  for (let i = 0; i < this.length; i++) {
    result.push(cb(this[i], i, this));
  }
  return result;
}

const res = arr.my_map((item, index, arr) => {
  // console.log(item, index, arr);
  return item + '1';
})

console.log(res);
